package game.zqll.systems;

import com.artemis.BaseSystem;
import com.badlogic.gdx.utils.StringBuilder;

public class HighScoreManager extends BaseSystem {

    private int maxScore = 0;
    private ModGuiSystem guiSystem;

    @Override
    protected void initialize() {
        guiSystem = world.getSystem(ModGuiSystem.class);

    }

    @Override
    protected void processSystem() {
        if (guiSystem != null) {
            StringBuilder text = guiSystem.getInfoLabel().getText();
            text.insert(0, "maxScore: " + maxScore + "\n");;
            guiSystem.getInfoLabel().setText(text);
        }
    }

}
